<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>选择试卷</title>
<%@include file="../core/head.jsp"%>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="${ctx }/css/core.css" type="text/css">
<link rel="stylesheet" href="${ctx }/css/exam.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/buttons.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/table.css" type="text/css">
 
<script type="text/javascript" src="${ctx }/js/modules/code/MessageBox.js"></script>
<script type="text/javascript">
function changeSubMebu(){
	
}
 
function startExamination(){
	var select = $("#paperSelect");
	var arr =	select.val().split("|");
	$("#examPid").val(arr[0]);
	$("#examId").val(arr[1]);
	$("#examState").val(arr[2]);
	$("#examTitle").val(select.find("option:selected").text());
	$("#mainForm").submit();
}
</script>
</head>

<body>
<%@include file="top.jsp"%>
<div class="width center menuPanel radius">
	<div class="context center">
	<form action="${ctx }/exam/start.action" id="mainForm" method="post">
	<div style="margin-top: 80px;" align="center">
	
		<table class="table">
			<tr>
				<th>考试类型：</th>
				<td>
					<select id="type" name="examination.type" onchange="changeSubMebu()">
						<z:dic code="" isType="true" init="true"/>
					</select>
				</td>
			</tr>
			<tr>
				<th>选择试题：</th>
				<td>
					<input type="hidden" id="examId"  name="examination.id">
					<input type="hidden"  id="examPid" name="examination.paperId">
					<input type="hidden"  id="examTitle" name="examination.title">
					<input type="hidden"  id="examState" name="examination.state">
					<select id="paperSelect">
						<c:forEach var="p" items="${papers}">
							<option value="${p.paperId}|${p.id}|${p.state}" selected="selected"> ${p.title } </option>
							<c:if test="${p.state eq 2 }">
								<c:set var="haswrong" value="true"/>
							</c:if>
						</c:forEach>
						<c:if test = "${!haswrong}">
							<option value="0000000000000000000">我的错题</option>
						</c:if>						
			    	</select> 
				</td>
			</tr>
			<tr>
				<th></th>
				<td><label>不显示答案：<input type="checkbox" name="sealExam" value="true"/></label>&nbsp;
				<label>继续上次答题进度：<input type="checkbox" name="continueExam" value="true"  checked="checked" /></label></td>
			</tr>
			<tr>
				<th></th>
				<td><input class="button blue menuBut" type="button" onclick="startExamination()" value="开始答题"/></td>
			</tr>
		</table>	
		<c:if test="${user.fromMobile}">
			<div style="color:red;width: 80%;text-align: left;">提示： 由于试题量巨大，移动终端用户可以在Wifi环境下，先将试题加载完成，然后再作答，以节省流量！</div>
		</c:if>
	</div>
	 
	
	</form>
 </div>
 </div>
 
<%@include file="../core/bottom.jsp"%>
</body>
</html>
